package com.heima.article.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.article.dtos.ArticleHomeDto;
import com.heima.model.article.dtos.ArticleInfoDto;
import com.heima.model.article.pojos.ApArticle;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.mess.ArticleVisitStreamMess;

public interface ApArticleService extends IService<ApArticle> {

    ResponseResult  loadArticleList(ArticleHomeDto dto,Short type);

    ResponseResult saveOrUpdateArticle(ArticleDto dto);


    /**
     * 加载首页
     * @param dto
     * @param type
     * @return
     */
    ResponseResult loadFirstPage(ArticleHomeDto dto,Short type);

    //回显高亮
    ResponseResult loadArticleBehavior(ArticleInfoDto dto);
    /**
     * 更新文章的分值  同时更新缓存中的热点文章数据
     * @param mess
     */
    public void updateScore(ArticleVisitStreamMess mess);
}
